package com.phoenix.jsef.framework.accessfilter;

/**
 * 相等(EQUAL)的过滤条件构造器
 *
 * @author 李启联
 */
class AccessFilterEqualItem extends AccessFilterItem {
    /**
     * 相等(EQUAL)的过滤条件构造器
     *
     * @param andCondition 使用 and 或者 or 条件拼接
     * @param filterKey    属性名称
     * @param filterValue  属性值
     */
    AccessFilterEqualItem(boolean andCondition, String filterKey, Object filterValue) {
        super(andCondition, filterKey, filterValue);
    }

    @Override
    public String toString() {
        return ((filterValue == null) ? "" : ( (andCondition) ? " AND " : " OR ") + filterKey + " = '" + filterValue + "'");
    }
}